import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      component: () => import('../views/home/index.vue')
    },
    {
      path: '/theme/more',
      component: () => import('../components/common/ThemeMore.vue'),
    },
    {
      path: '/found',
      component: () => import('../views/found/index.vue')
    },
    {
      path: '/mine',
      component: () => import('../views/mine/index.vue')
    },
    {
      path: '/login',
      component: () => import('../views/mine/login.vue')
    },
    {
      path: '/comic/:cid(\\d+)',
      component: () => import('../components/common/ComicDetail.vue')
    },
    {
      path: '/comic/:cid(\\d+)/:sid(\\d+)',
      //component: () => import('../components/reader/Reader.vue')
      component: () => import('../components/common/Read.vue')
      //component: () => import('../components/common/Reader.vue')
    },
    {
      path: '/404',
      component: () => import('../components/common/404.vue')
    }
  ]
})
